FROM docker.v2.aispeech.com/vertx/centos7.3-java8-tensorflow:base
MAINTAINER kai.li

STOPSIGNAL SIGTERM

RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LC_ALL zh_CN.utf8

ENV APP_JAR /app/api.jar

ENV ETCD_PROJECT_IDENTIFICATION /lasr/api

COPY ./target/api.jar $APP_JAR

# We use the "sh -c" to turn around https://github.com/docker/docker/issues/5509 - variable not expanded
ENTRYPOINT ["sh", "-c"]
CMD ["java -Xms512m -Xmx512m -jar $APP_JAR"]
